package com.xmall.auth.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xmall.auth.entity.SysPermission;
import com.xmall.auth.entity.SysRolePermissionRelation;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 后台用户角色和权限关系表 Mapper 接口
 * </p>
 *
 * @author liuzh
 * @since 2020-06-14
 */
public interface SysRolePermissionRelationMapper extends BaseMapper<SysRolePermissionRelation> {
    /**
     * 批量插入角色和权限关系
     */
    int insertList(@Param("list") List<SysRolePermissionRelation> list);

    /**
     * 根据角色获取权限
     */
    List<SysPermission> getPermissionList(@Param("roleId") Long roleId);
}
